home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ASME's Mechanical Engine…ing Toolkit 1997 December
/
ASME's Mechanical Engineering Toolkit 1997 December.iso
/
dynamics
/
aero141a.txt
< prev
next >
Wrap
Text File
|
1994-05-07
|
21KB
|
529 lines
FORMAT OF WORLD & SEQUENCE FILES
--------------------------------
AERO data files are user-readable ASCII files. Comments start with a
hash mark ("#") and extend to the end of the line. Lower case characters
denote an optional value and need not be specified - in this case the
default values (often 0) are used.
STATE FORMAT
Z # begin of a new state
t <starttime:real>
g <gravity:vector>
s <seed value for random value generation:integer>
# any number of bodies
K<bodynr:+integer> <bodytype> <body geometry> <material>
m <mass:real> # mass in kg
p <position:vector> # position of the center of gravity in meter
v <velocity:vector> # in meter per second
a <acceleration:vector> # [m/s^2]
q <quaternion> #
w <vektor> # rotary velocity [rad/s]
u <vektor> # rotary acceleration [rad/s^2]
c <red:ushort> <green:0-65535> <blue:ushort> # color
n <transparency:real> <reflexion:real> <roughness:real> # for ray tracer
b -[g][m][k] # type of movement: no gravity,
# no mass, no collision check
i <idnr:long> # identification nummber
For a "composed" body, the corresponding embedded bodies with their
parameters should be following the body definition.
The position of the composed object is computed as the center of gravity of
the embedded bodies!
E <bodytype> <geometry> <material> # only cuboid, sphere and cylinder are allowed
m <mass:real> # mass [kg]
p <position:vektor> # position [m]
q <quaternion> # quaternion ref. Inertialsystem
c <red:ushort> <green:ushort> <blue:ushort> # color
X # end marker of a composed object
Links are entered as follows:
V<linknr> K<nr1> K<nr2> <linktype> <linkparameters> # any number of links
a <linkpoint1:vektor> # position of connection at body <nr1>
b <linkpoint2:vektor> # and at body <nr2>
A constant force of <strength> is applied at a point of a body during the
time intervall t0 and t1.
F <t0:real> <t1:real> K<bodynr> [<point:vektor>] <forceparameter>
Q # denotes the end of the current state
For all definitions above, the following types apply:
long = 0..2^31
ushort = 0..65535
vector = <real> <real> <real>
quaternion = <real> <real> <real> <real>
bodytype = sphere | box | cylinder | plane | nail | mpoint | point | composed
bodygeometry of "sphere" = <radius:real>
bodygeometry of "cylinder" = <radius:real> <height:real>
bodygeometry of "box" = <xyz-dimensions:vector>
<material> = material name from the material table e.g.: iron, plastic, ..
# this is only set for sphere, box, cylinder und plane !
<linktype> = spring | damper | joint | rod
linkparameter for "spring" = <resting length:real> <spring constant:real>
linkparameter for "damper" = <damping constant:real>
linkparameter for "rod" = <length:real>
<forceparameter> = inertial <force:vektor> # const. force in inertial system [N]
<forceparameter> = local <force':vektor> # force ref to body coord. system
<forceparameter> = guided <force:real> K<targetbody> [<target position:vektor>]
# constant force in [N] directed always to a point at the target body
The following samples show erroneous entries, which will be checked
when read by AERO:
* Z
* g 0 -9.81 0 # negative gravity
*
* K1 box 0.1 0.2 0.3 iron # iron cuboid falls down to nowhere
* v -1.0 0 0
*
* K2 sphere 0.05 plastic # plastic sphere as pendulum
* p -2.0 10.0 0
*
* K3 nail
* p 0.0 10.0 0.0
*
* V1 K2 K3 rod 2.0
*
* F1 K1 0 1 0 0 0 inertial 10 0 0 # force in the center of K1 in x-diection with
* # strength 10N is applied during time 0s <= t <= 1s
* Q
MATERIAL FORMAT:
# this is an remark
M <maximum number of materials:Integer>
m <name:string> <density:real> <dynamic friction constant:real>
<static friction constant:real>
<impact value:real> <spring value:real> <damping value:real>
[<default_red:ushort> <default_green:ushort> <default_blue:ushort>
<transparency:real> <reflexion:real> <roughness:real>]
# density in [kg/m^3]
# transparency in the interval 0..1
Q
CONFIGURATION FORMAT
P
h <integration step width:real> <min> <max>
e (Y|N) <eps:real> # error control Y(es) or N(o)
k (Y|N) <collision step width:real> # collision activated Y(es) or N(o)
b <max. resting speed:real> <min. penetration depth:real>
u <min. sliding speed:real> <min. rolling speed:real>
g (Y|N) <random gravity in %:real>
r <rod spring constant:real> <rod damping constant:real>
j <joint spring constant:real> <joint damper constant:real>
m <minimal srping stretching:real>
q <maximal cuboid-collision diagonal depth:real>
s (Y|N) # spring impact YES, NO
a (Y|N) <cw-value of sphere:real> <cw-value of cuboid:real> <cw-value of cylinder:real>
Q
The AERO internal format is now described by using an example.
Sample world (state) file:
W # start world file
M 32 # material table, may contain 32 entries
# two materials, "iron" and "wood" are entered
m iron 7.8000e+03 1.0000e+00 1.3000e+00 9.0000e-01 5.0000e+04 5.0000e+02
m wood 6.0000e+02 5.0000e-01 6.5000e-01 7.0000e-01 5.0000e+04 5.0000e+02
Q # end of material table
Z # start description of current state: objects, forces, and links
t 1 # time of state description
g 0 -9.81 0 # gravitation vector
# object definitions start with letter "K" plus a number
# "K1" is the first object: sphere, radius 5cm, material iron
K1 sphere 5.00000000e-02 iron
# mass
m 4.08398627e+00
# position
p -2.14595881e-01 8.11705112e-02 0.00000000e+00
# orientation
q 6.61532809e-01 0.00000000e+00 0.00000000e+00 -7.49916216e-01
# velocity
v -1.54115612e-03 1.68088549e-03 0.00000000e+00
# rotary velocity
w 0.00000000e+00 0.00000000e+00 1.72884763e-02
K2 nail # object labelled "K2": immmovable point (nail)
p 0.00000000e+00 4.00000000e-01 0.00000000e+00
# link definitions start with letter "V" plus a number
# "V1" links objects K1 and K2 with a rod of specified length
V1 K1 K2 rod 3.26810113e-01
# the following line(s) denotes the link's fixture point for
# the first and/or second object (marked "a" or "b"), in case
# it is not identical to an object's center.
a 3.75000000e-02 -4.00000000e-02 0.00000000e+00
V2 K1 K2 rod 4.12310563e-01
# the second link "V2" is again between object K1 and K2
a 3.00000000e-02 4.00000000e-02 0.00000000e+00
b -5.50000000e-01 -3.12250226e-17 0.00000000e+00
# force definitions start with letter "F"
# next params: start and termination time for applying force
# next params: object (here "K1"), force type (guided,
# inertial, or local), force attack vector (includes strength)
F 1 1.01 K1 inertial 0 0 4
Q # end description of current state
# end of world file
Sequence files are similar to world files, however, they may conatain several
"world" states. For these, a mark "X" has to be placed before the first state,
and a mark "Y" has to be placed after the last state.
NOTICE
The AERO software package is licensed free of charge. Therefore, we
provide absolutely no warranty of any kind in any case. The Universitaet
Stuttgart and the authors provide the AERO software package "as is"
without warranty of any kind, either expressed or implied, including, but not
limited to, the implied warranties of merchantability and fitness for a
particular purpose. The entire risk as to the quality and the performance of
the program is with you. Should the AERO software package prove defective,
you assume the cost of all necessary servicing, repair or correction.
In no event may the Universitaet Stuttgart or any of the programs' authors be
liable to you for damages, including any lost profits, lost monies, or other
special, incidental or consequential damages arising out of the use or inability
to use (including but not limited to loss of data or data being rendered
inaccurate or losses sustained by third parties or a failure of the program to
operate with programs not included in the AERO software package) the
program, even if you have been advised of the possibility of such damages, or
for any claim by any other party.
COPYRIGHT AND PUBLIC DOMAIN LICENCE
The AERO software package is being distributed by the Universitaet
Stuttgart as public domain software. Copyright (c) is with the authors, Hartmut
Keller, Horst Stolz, Andreas Ziegler and Thomas Braunl at the Univ. Stuttgart,
IPVR, Germany.
There is no warranty in any case as stated in the paragraph above.
You are free to use and copy the original AERO software package free of
charge for non-commercial applications, provided that
the notices on copyright, public domain, and no warranty of this page
as well as a reference to the Computer Science report on AERO
by the authors are included,
You may obtain the AERO software package for any of the following computer
systems:
* SUN 4 / Sparcstation
* IBM RS/6000
* IBM PC (linux) or compatibles
DOCUMENTATION
Keller, Stolz, Ziegler, Braunl: Adventures in Virtual Mechanics - Simulation
and Animation of Rigid-Body-Systems, Computer Science Report, no. 8/93,
Univ. Stuttgart, Germany, July 1993
HOW TO COPY FILES VIA "ANONYMOUS FTP"
enter: ftp ftp.informatik.uni-stuttgart.de
> Connected to inf.
> 220 inf FTP server (Version 6.36 SVR4 Thu Mar 18 10:49:05 MET 1993) ready.
> Name (ftp:...:):
enter: ftp
> 331 Guest login ok, send e-mail address as password.
> Password:
enter: <your email address>
> ...
> ftp>
enter: cd pub/AERO
> 250 CWD command successful.
> ftp>
enter: get README
(for ASCII text files)
> ...
enter: bin
enter: get aero.sun4.tar.gz
(for binary files)
> ...
enter: bye
(to exit)
> 221 Goodbye
-------------------------------
After copying binary files you have to "un-zip" and "de-tar" them.
These filenames look like: xyz.tar.gz
Type: gzcat xyz.tar.gz | tar xvf -
-------------------------------
========================================================================
Univ. Stuttgart IPVR, Breitwiesenstr. 20-22, D-70565 Stuttgart, Germany
========================================================================
-------------------------
AERO "ADVENTURES IN VIRTUAL MECHANICS"
-------------------------
AERO is an X-window based tool for simulation and visualization of
rigid-body systems. AERO contains a 3D scene editor for designing
simple blocks world scenes. Objects may be placed in space, linked
to each other, and forces may be exerted onto them.
In animation mode, the simulation of the scene entered is carried
out in real time (depending on scene complexity) displaying 3D
wire frames. Also, a flag can be set to generate scene description files
for each time point as input files for a ray tracing program, producing
photorealistic output.
In both modes, wire frame and ray tracing scenes, the generation of
stereo images is possible. In the case of real time wire frames
a red-green representation of the scene is rendered, which can be viewed
with red-green glasses. For the ray tracing output, a binocular pair
of scene descriptions is generated for each time step.
AERO can be used for exploring the physical laws of mechanics and
also for generating realistic computer animations. AERO is available
free of charge as public domain software. Software and documentation
can be copied via "anonymous ftp" over the Internet.
The address of our server is:
ftp.informatik.uni-stuttgart.de (currently 129.69.211.2)
The directory is:
pub/AERO
------------------------------------
For installing the binaries:
copy the appropriate binary file,
decompress and de-tar it:
e.g. gzcat aero.sun4.tar.gz | tar xf -
copy the file "xaero" into your local "bin" directory, then
copy the file "XAero" (note the capital letters) in your local
"app-defaults" directory and set the environment variable appropriately:
e.g. setenv XAPPLRESDIR ~your_name/your_app-defaults/
then start AERO:
e.g. xaero
Trouble shooting;
In case you encounter the erroor message after starting AERO:
"Error: Widget EM_Darstellung3D has zero width and/or height"
then there is a problem with your installing the "app-defaults-file"
(AERO cannot find it). Re-try the installation instructions above.A
------------------------------------
For scene rendering you need:
POVray public domain ray tracing software
from alfred.ccs.carleton.ca (134.117.1.1)
in pub/pov-ray/POV-Ray1.0
(for the current AERO version, you have to use POVray1.0
or POVray2.0 with command line option "+MV1.0")
------------------------------------
For viewing the animations you need:
MPEG-decoding software
from toe.cs.berkeley.edu (128.32.149.117)
in pub/multimedia/mpeg
------------------------------------
For compiling the sources you need:
X11-libraries (best: Release 5 or newer)
Athena-Widget-Set
FWF-Widget-Set from a.cs.uiuc.edu (128.174.252.1)
in pub/fwf.shar.Z
or from ftp.informatik.tu-muenchen.de (131.159.0.110)
in /pub/comp/X11/contrib/lib/fwf/fwf.tar.Z
gcc (Version at least 2.3.3)
ld or gld
------------------------------------
Academic reference:
Keller, Stolz, Ziegler, Braunl: Virtual Mechanics -- Simulation
and Animation of Rigid Body Systems, Report of the Computer
Science Department, Univ. Stuttgart, no. 8/93, August 1993
Hartmut Keller keller@hermes.informatik.uni-stuttgart.de
Horst Stolz stolz@hermes.informatik.uni-stuttgart.de
Andreas Ziegler aziegler@hermes.informatik.uni-stuttgart.de
Thomas Braunl braunl@informatik.uni-stuttgart.de
========================================================================
Univ. Stuttgart IPVR, Breitwiesenstr. 20-22, D-70565 Stuttgart, Germany
========================================================================
AERO User Guide
===============
AERO is startet with the command
xaero
(be sure to have the file "xaero" installed in your local "bin"
directory and the file "XAero" in your local "app-defaults" directory.
In case of problems: place both files in your home directory and start
from there)
You may start the program with command line parameters to compute a sequence
off-line (in batch mode).
Command line parameters are :
-b run program in batch mode
-f name specify input file of sequence or world (single state)
-s name specify output file for sequence
-nb count number of images to be computed for sequence
Without command line parameters, the program starts in interactive mode
and displays the editor window. Scenes may loaded from file or edited
from scratch. All objects can be given material types. The regular table
of materials may be replaced by loading another table from file, or it may
be edited (only possible if at least a single object is in the scene).
EDITOR WINDOW & OBJECT WINDOW
-----------------------------
New objects may be selected from the menu "insert new object": sphere,
cylinder, cuboid (box), immovable point or plane. They appear in the center
of the coordinate system and may be translated using cursor keys in one
of the 2D views or the appropriate buttons in the object window. Objects may
be rotated using the buttons in the object window. For each object, material
and color may be set independently. The material determines an objects
density, which together with its volume determines its weight.
However, one may choose button "no gravitation" to inhibit the gravitational
force on an object. Button "fixed" locks an object in its position (it cannot
be moved by gravitation or other forces, e.g. collision with moving objects).
Objects may be selected one after the other by pressing the "select next object"
button in the main window. A selected object may be deleted by pressing the
appropriate button or liked to another object by selecting one of the link
types: rod, spring, damper or joint. The object to be linked with and some
parameter have to be specified. The link position is displayed with an "X".
Links may be removed by first selecting the link and then deleting the selected
link by pressing the appropriate buttons.
Forces may be exerted onto objects (button "add force"): directed force (always
directed to the current position of another object), force with respect to
an object, and force with respect to the coordinate system. The target point
and the goal position (directed force) or the direction (other forces) have
to be specified together with the duration and strength of the force.
Quite a number of parameters for performing the rigid body simulation
may be entered from the parameters menu (e.g. setting the gravity value,
frames per second ratio, or the computation and simulation methods).
The buttons "zoom in" and "zoom out" change the camera zoom. Button step
computes a single successor image according to the rules selected. Note,
this function cannot be un-done.
ANIMATION WINDOW
----------------
Button "Animation" opens the animation window with all objects in their
current state. Note, not all image frames computed will also be stored!
Only those image frames marked as "sync points" will be stored (use button
"sync point" / "no sync point" for setting/unsetting). Similar to movie
editing, cuts may be inserted into an animation sequence by means of the
button "same scene" / "new scene".
The animation may be controlled via the buttons representing the functions
of a video recorder. For returning to the editor window, press button "close".
CALCULATION PARAMETERS
----------------------
integration step width
error control
accuracy between steps
min. step width
max. step width
The simulator integrates the acceleration and velocity to compute the
positions of the objects. It uses a Runga-Kutta process to do this. If
the error control ist not set, it is done with the constant
time-step-rate of "integration step width". If the user choose "error control",
the value in "accuracy between steps" is used to compute a step rate,
which lies between min. and max. step width.
collision detection
collision step width
max. resting speed
min. penetration depth
min. sliding speed
min. rolling speed
spring impact
If the collision detection is active, at least every "collision step
width" a collision detection is invoked to determine if objects
penetrate each other. The collision detection routine generates a list
of collision points with the velocity and penetration depth. The
collision velocities that are lower than the "max. rest speed" are
handled as touching, all others as impact. The penetration depth should
alway be greater than the "min. penetration depth". The "min. sliding
speed" and "min. rolling speed" determine the type of friction which
is applied: static or dynamic friction. Normally, an analytic solution
to determine the velocities after an impact is used. The computation
method by using springs and dampers (penality-methode) for the
collision handling is used for the handling of the touching process
and can also be applied to impacts when "spring impact" is activated.
Please note that the material constants of the material-table are used
in the analytical and penality methode.
random gravitation
random gravitation rate
By setting "random gravitation" a random value is added to the gravity
applied at every object.
joint damping
joint spring constant
rod damping
rod spring constant
min. spring stretching
The upper values are necessary because of the approximation of a "rod" and
a "joint" by a spring and damper pair.
air resistance
cw for sphere
cw for cuboid
cw for cylinder
A simplified air resistance can be activated, which uses the projected
body-plane and the cw-value to compute a force opposing the direction of
movement.